import request from '@/utils/request'

// 查询缺陷类型列表
export function listDrawbackType(query) {
  return request({
    url: '/yyj/qc/drawbackType/list',
    method: 'get',
    params: query
  })
}

// 查询缺陷类型列表
export function allDrawbackType(query) {
  return request({
    url: '/yyj/qc/drawbackType/all',
    method: 'get',
    params: query
  })
}

// 查询缺陷类型详细
export function getDrawbackType(drawbackTypeCode) {
  return request({
    url: '/yyj/qc/drawbackType/' + drawbackTypeCode,
    method: 'get'
  })
}

// 新增缺陷类型
export function addDrawbackType(data) {
  return request({
    url: '/yyj/qc/drawbackType',
    method: 'post',
    data: data
  })
}

// 修改缺陷类型
export function updateDrawbackType(data) {
  return request({
    url: '/yyj/qc/drawbackType',
    method: 'put',
    data: data
  })
}

// 删除缺陷类型
export function delDrawbackType(drawbackTypeCode) {
  return request({
    url: '/yyj/qc/drawbackType/' + drawbackTypeCode,
    method: 'delete'
  })
}
